//
//  DescViewController.m
//  AffectionBee
//
//  Created by 李通 on 16/8/21.
//  Copyright © 2016年 chivalrous. All rights reserved.
//

#import "DescViewController.h"

@interface DescViewController ()<UIWebViewDelegate>

@property (nonatomic,weak) UIWebView *webView;

@end

@implementation DescViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIWebView *webView = [[UIWebView alloc]initWithFrame:self.view.bounds];
    self.webView = webView;
    [self.view addSubview:webView];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.customURL] cachePolicy:0 timeoutInterval:15];
    [webView loadRequest:request];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"v2_refresh"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(didClickRefresh)];
}

- (void)didClickRefresh {
    [self.webView reload];
}

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
    
    
}

@end
